import request from '@/utils/request'

//品牌请求接口
///admin/product/baseTrademark/{page}/{limit}   get 
export const reqTrademarkList = (page,limit) => request({url:`/admin/product/baseTrademark/${page}/${limit}`,method: 'get'})

//添加品牌 /admin/product/baseTrademark/save
//修改品牌 /admin/product/baseTrademark/update

export const reqSaveOrUpdate = (data) => {
    if (data.id) {
        //修改
        return request({ url: `/admin/product/baseTrademark/update`, method: 'put', data })
    } else {
        //新增
        return request({ url: `/admin/product/baseTrademark/save`, method: 'post', data })
    }
}

//删除品牌 /admin/product/baseTrademark/remove/{id}

export const reqDeleteTrademark = (id) => request({url:`/admin/product/baseTrademark/remove/${id}`,method:'delete'})